<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body style="background-color:lightgray;">
<div style="margin: auto;text-align: center">
    <h1>欢迎来到宿舍管理系统</h1>
    <h2>${sessionScope.loginUser.userName}:你好</h2>
</div>
<div style="text-align: center">
    <% Date date = new Date();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("hh:mm:ss");
        String time = simpleDateFormat.format(date);
    %>
    <p>现在的时间是: <% out.print(time);%></p>
</div>
<div >
    <div style="float:left;margin-left: 10%">
        <dl style="width: 200px;font-size: 18px;background-color:lightblue;">
            <c:forEach items="${sessionScope.loginUser.permissionList}" var="per">
                <c:if test="${per.pid == 0}">
                    <dt style="margin-top: 20px">${per.permissionName}</dt>
                </c:if>
                <c:if test="${per.pid != 0}">
                    <dd style="margin-top: 10px;"><a style="text-decoration:none;" href="${per.permissionUrl}">${per.permissionName}</a></dd>
                </c:if>
            </c:forEach>
        </dl>
    </div>
    <div style="float: right;margin-right: 10%">
        <img style="width: 1000px;height: 500px;margin-right: 10%" src="http://pic.netbian.com/uploads/allimg/190802/203716-15647494365dc7.jpg">
    </div>
</div>

</body>
<script>

</script>
</html>